The present invention generally relates to a computer pointing devices, and more specifically, to encoding a signal produced by a computer pointing device.
Computer pointing devices are well known in the art, and have been quite popular with computer users since their introduction. A computer user manipulates a pointing device to change the position of a cursor or other object on a computer display, or to select objects on the display, including letters, one or more words, controls, etc. The physical movement of the pointing device results in a similar movement of the cursor and/or object on the display. One of the most widely used computer pointing devices, which is commonly referred to as a xe2x80x9cmouse,xe2x80x9d typically includes a ball rotatably disposed in a cavity formed on an undersurface of the mouse. The ball rotates as the mouse is moved across a flat surface, often over a pad, and an encoded signal is produced in response to the movement of the mouse.
A conventional ball-based pointing device includes a pair of encoder shafts in the housing that are frictionally driven by the ball as it rolls over a surface. The encoder shafts rotate about a pair of orthogonal axes, i.e., the xe2x80x9cXxe2x80x9d and xe2x80x9cYxe2x80x9d axes, in response to components of the ball""s rotation along those axes. At one end, each encoder shaft terminates in a serrated disc. As the encoder shafts rotate, these serrated discs periodically interrupt a light beam traveling from a light emitting diode (LED) source to a photo detector, generating a nominal square-wave signal at the output of the detector. The signals produced by the detector indicate the device""s incremental motion along the orthogonal axes and are processed by a micro-controller or other logical processor in the pointing device, which produces a corresponding stream of digital values indicative of a position of the pointing device relative to the X and Y axes. The digital values indicative of the displacement of the pointing device relative to these two axes are passed to a driver program executing on the computer to which the pointing device is attached. The relative position data are processed by the computer, causing a cursor or other object displayed on a monitor to move in response to a user""s movement of the mouse. Thus, the X and/or Y movement of the cursor on the display screen is a function of the rotational motion of the ball within the pointing device relative to the X and/or Y axes.
The frequency of each square wave is a measure of the X and Y components of the velocity of the mouse, but this frequency only indicates the speed of movement along one of the axes and does not indicate the direction (left/right, up/down) of the mouse motion. To determine directional information, a second photo detector is disposed near each disk such that its waveform is displaced 90 degrees in phase with respect to the first detector""s waveform. By sampling the two X waveforms, a microprocessor can infer both the speed and the direction of the X component. The speed and direction of the Y component are determined in the same manner.
The waveform for one axis represents a series of transitional states. It is the sequence of these transitional states that indicates the direction of travel. For every state change, a new movement command is issued by the microprocessor. Normally, when a user manipulates a computer pointing device at a modest speed, the frequency at which the microprocessor samples or xe2x80x9clooks atxe2x80x9d the waveforms is sufficient to detect every transitional state of the waveform. However, as the mouse moves faster, the frequency of the square waves increases, effectively reducing the number of samples taken by the microprocessor. If the mouse speed is sufficiently great that a transitional state is not sampled, then the processor sees an illegal transition between non-adjacent states. Traditionally, when an illegal transition has occurred in prior art encoders, no movement command is issued for the illegal transition. Lack of movement commands for such illegal transitions can cause the mouse-controlled motion of a cursor on a computer screen to appear to falter. The traditional rationale for ignoring illegal transitions is that such transitions are directionally ambiguous, i.e., a two-state jump could mean a movement in either of the two possible directions (left/right, or up/down).
However, a conventional mouse encoder actually misses more states than can be accounted for by an excessive rate of mouse movement. The theoretical symmetrical rectangular idealized waveforms are rarely ever attained from the optical sensors. There are several causes for this problem. First, the vanes on the serrated disks used in the encoder are not zero-size objects. Although the vanes on the serrated disks are sharply defined, their finite size causes the light reaching the photo detectors, and hence their response, to increase and decrease gradually, rather than instantaneously. Also, the response speed of the LED detector pairs is not instantaneous, and that response speed is a function of the sensitivity or gain of the LED detector. A third reason that the actual waveforms vary from a theoretical ideal relates to the one/zero decision threshold of the processor in response to the signal input from the encoder, which is seldom one-half of the peak signal magnitude. A final cause is that physical constraints mean the ideal 90 degree placement of the photo detector pairs for each encoder disk is in reality not exactly 90 degrees, being subject to achievable mechanical tolerances.
Due to the first and second causes described above, the rise and fall times of the detector waveforms are finite. Because of the third cause noted above, the waveforms will be sampled at other than one-half of their peak values, which means that the one/zero decision threshold for the processor depends on both the sensitivity of the LED/photo detector combination and the actual threshold voltage of the processor input. Both of these factors can vary considerably over a production batch. The result is that the duty cycle of the waveforms will vary from the ideal value of 50%. Finally, the imperfect mechanical positioning of the pairs of photo detector pairs for each encoder disk means that the dual waveforms that they produce will not actually exhibit the expected ideal 90 degree phase relation.
These effects combine to cause the different transitional states to have different widths (that is, different time durations), which causes the missed-state/illegal transition effect described above to begin occurring at slower mouse speeds than might otherwise be expected. Clearly, states whose durations are shorter than the sampling interval will not always be seen. For instance, a state whose duration is equal to one half the sampling interval will not be detected about half the time (assuming the state period and the sample period are incommensurate, as is normally the case).
It would be desirable to extract useful information from illegal state transitions, and to use that information to improve the performance of a computer pointing device, rather than completely ignoring these illegal state transitions as is taught by the prior art. Contrary to the current view, the directional ambiguity of a skipped state should not be a concern, because when a pointing device is being moved at a sufficiently high speed to cause illegal state transitions, it is very unlikely that the direction of movement of the pointing device can be reversed rapidly enough to cause an error in determining the direction of movement. To underscore the improbability of such rapid reversal in direction of mouse movement, note that a typical sampling interval is 200 microseconds, and skipped states might start occurring at speeds over 5 inches/second. To reverse the direction of a mouse in a time period of less than 400 microseconds (i.e., 2 sample intervals) would require the mouse to decelerate and then accelerate in the opposite direction at over 25,000 inches/second2. Realistically, to reverse direction, a mouse will have to slow down over many sampling intervals, and it is unlikely that a state change corresponding to the reversal in direction will not be sampled.
It would also be desirable to assign a value to the number of states skipped in an illegal transition. For example, in a waveform that is characterized by four states per cycle, if the last known transition state corresponds to State 1, and the next known transition state subsequent to an illegal transition is State 3, then logically, the number of states skipped during the illegal transition can only be one. Thus, without knowing the actual shape of the missing section of the waveform, some information about that portion of the waveform can be deduced.
Accordingly, it would be desirable to develop a method of encoding the movement of a mouse, which instead of ignoring illegal transitions, assumes that the direction corresponding to the skipped state is consistent with the last identified direction. This method should also include information relating to the number of states skipped during an illegal transition. The prior art does not teach or suggest such a method.
A first aspect of the present invention is directed to a method for use with a pointing device having a plurality of detectors that produce signals, which change state to indicate movement of the pointing device relative to each of two orthogonal axes. The method detects movement of the pointing device relative to each of the two orthogonal axes even when changes in state have been skipped. Changes in the state of the signals are monitored, producing a movement value for the pointing device corresponding to the change in the state of the signals. The method detects when a change in the state of the signals has been skipped. When a skipped state occurs, a compensating movement value for the pointing device corresponding to an expected change in state of the signals is produced.
The step of producing the compensating movement value includes the step of assigning a direction to the compensating movement value identical to that of a movement value that was just determined. The compensating movement value is twice the movement value produced when a change in state has not been skipped.
Preferably, to produce the movement value and the compensated movement value, a lookup table is accessed. Movement values and compensated movement values for each orthogonal axis are accumulated for a predefined interval, to produce an output signal. In one form of the invention, the output signal is supplied from the pointing device to a host computer for use in controlling an object on a display in response to movement of the pointing device. In another form of the invention, the movement value and the compensated movement value are each determined by a host computer.
The step of detecting when a change in the state of the signals has been skipped preferably comprises the steps of defining an expected order in which the states being monitored should change. The skipped state is then detected when the states being monitored have not changed in the expected order.
Another aspect of the present invention is directed to a computer-accessible memory media on which are stored computer-executable machine instructions. When executed by a computer, the machine instructions generally cause the steps of the above method to be carried out.
Yet another aspect of the present invention is directed to apparatus for controlling an object on a display. The apparatus includes an element mounted so as to be movable by a user relative to each of two orthogonal axes. A plurality of detectors are positioned to sense movement of the element, producing a plurality of pairs of signals. Each pair of signals has a phase relationship that defines changes in state indicative of the movement of the element relative to a different one of the two orthogonal axes. A conditioning circuit is coupled to the plurality of detectors to sample the plurality of pairs of signals. The conditioning circuit produces a digital signal corresponding to samples of the plurality of pairs of signals for each axis. A memory is provided in which machine instructions are stored, and a processor is coupled to the memory, and to the conditioning circuit to receive the digital signal. The processor executes the machine instructions to carry out functions generally consistent with the steps of the method discussed above.